cmake_minimum_required(VERSION 3.20)

project(demo)

set(BPATH ${PROJECT_SOURCE_DIR})

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/libout1)

add_subdirectory(libsrc2)

aux_source_directory(libsrc1 src1)

add_library(libs1 STATIC ${src1})

add_executable(main main.cpp)

target_include_directories(main PUBLIC include)
target_include_directories(libs1 PUBLIC include)

find_library(libs2 ${PROJECT_SOURCE_DIR})

target_link_libraries(main libs1 libs2)

